/**
 * Created by hasee on 2017/7/8.
 */
var oUl = document.getElementById("roll_ul");
console.log(oUl)
var aLi = document.getElementsByClassName("lis");

var  A  = document.getElementsByClassName("a1")

var span  = document.getElementsByClassName("span1");

var In_put=document.getElementById("in_put");



/**
 * 生成手机号尾数
 * @returns {Number}
 */
function getPhoneMantissa() {
    var timer = parseInt(Math.random() * 900);
    // console.log(timer)
    return timer
}

function shijian2() {
    var timer2 = parseInt(Math.random() * 100);
    // console.log(timer2)
    return timer2
}



var num = 30;
setInterval(function () {
    for(var i = 0; i < A.length;i++){
        A[i].innerHTML ="用户***" + getPhoneMantissa();
    }

    for(var j = 0; j < span.length; j++){
        span[j].innerHTML =  shijian2() +"分钟前，获得宣传品印刷报"
    }
    console.log(oUl)

    oUl.style.top ="-" + num + 'px' ;
    if(oUl.offsetTop <= "-"+oUl.offsetHeight){
        num = -30;
    }
    num = num + 30;
    console.log(oUl.offsetTop)

},1500)